﻿@model LogsListViewModel
@{
    ViewBag.Title = "History";
    Layout = "~/Views/Shared/CustomerLayout.cshtml";
}

<h2>Historia</h2>
@if (Model != null && Model.logs != null && Model.logs.Count<UserLogs>() > 0)
{
      <table class="list">
            <thead>
                <tr>
                    <td>Typ</td>
                    <td>Data</td>
                </tr>
            </thead>
            @foreach (UserLogs log in Model.logs)
             {
                 <tr>
                    <td>@Helper.LogTypeToString((LogType)log.UserLogTypes.UserLogTypeID)</td>
                    <td>@log.UserLogDate.ToString("dd MMMM yyyy HH:hh")</td>
                 </tr>
             }
    </table>
    
    <div class="pagesNavigation">
        @Html.PageLinks(Model.PagingInfo, x => Url.Action("History", new { page = x }))
    </div>
}
else
{
    <h4>Nie zanotowano żadnych wydarzeń</h4> 
}